package com.lzy.crm.service;

import java.util.List;

import com.lzy.crm.base.page.PageQuery;
import com.lzy.crm.base.service.BaseService;
import com.lzy.crm.dao.criteria.CrowdUserCriteria;
import com.lzy.crm.domain.CrowdApply;
import com.lzy.crm.domain.CrowdUser;
import com.lzy.crm.domain.PpUser;
import com.lzy.crm.domain.User;
import com.lzy.crm.vo.PlayerInfo;

public interface CrowdUserService extends  BaseService<CrowdUser, CrowdUserCriteria> {

	
	
	/**
	 * 获取群成员
	 * @param crowdId
	 * @param pageQuery
	 * @return
	 */
	public List<CrowdUser> getCrowdUserList(String crowdId,String gameId,PageQuery pageQuery);
	
	
	/**
	 * 添加玩家进群
	 * @param crowdId
	 * @param user
	 */
	public void addCrowdUser(CrowdApply crowdApply,String remark)throws Exception;
	
	/**
	 * 添加玩家进群
	 * @param crowdId
	 * @param user
	 */
	public void addCrowdUserByPlayerInfo(String crowdId,String remark,PpUser user)throws Exception;
	
	
	/**
	 * 查询是否已经在群中
	 * @param crowdId
	 * @param gameId
	 * @return
	 */
	public boolean getCrowdUser(String crowdId ,String gameId);
	
	
	/**
	 * 查询在群中的信息
	 * @param crowdId
	 * @param gameId
	 * @return
	 */
	public CrowdUser getCrowdUserByCrowdIdAndGameId(String crowdId ,String gameId);
	
	
	/**
	 * 删除该牌友群所以关系
	 * @param crowdId
	 */
	public void delCrowdUserByCrowdId(String crowdId);
	
	/**
	 * 删除牌友群关系
	 * @param crowdId
	 */
	public void delCrowdUserByCrowdIdAndGameId(String crowdId,String gameId);
	
	
	/**
	 *  设置默认群信息
	 * @param user
	 * @param crowdId
	 * @param status
	 */
	public void updateCrowdStatusDefault(PlayerInfo playerInfo,String crowdId ,String status);
	
	/**
	 * 更新人数
	 * @param crowdId
	 */
	public void updateCrowdUserCount(String crowdId);
	
	/**
	 * 查询该人的牌友圈
	 * @param gameId
	 * @return
	 */
	public List<CrowdUser> getCrowdUserList(String gameId);
	
	
}
